import  numpy as np
fp=open("E.dat","w")
for ihang in range(100): 
 for i in range(1,21):
   a=np.loadtxt("sub"+str(i)+"/"+"E.dat")
#   print (np.size(a,0),np.size(a,1))
   for lie in range(2):
      fp.write(str(a[ihang][lie])+' ' )
   fp.write("\n")
fp.close()   

fp=open("CV.dat","w")
for ihang in range(100):
 for i in range(1,21):
   b=np.loadtxt("sub"+str(i)+"/"+"CV.dat")
   for lie in range(2):
      fp.write(str(b[ihang][lie])+' ' )
   fp.write("\n")
fp.close()   

fp=open("M.dat","w")
for ihang in range(100):
 for i in range(1,21):
   c=np.loadtxt("sub"+str(i)+"/"+"M.dat")
   for lie in range(2):
      fp.write(str(c[ihang][lie])+' ' )
   fp.write("\n")
fp.close()   

fp=open("Br.dat","w")
for ihang in range(100):
 for i in range(1,21):
   d=np.loadtxt("sub"+str(i)+"/"+"Br.dat")
   for lie in range(2):
      fp.write(str(d[ihang][lie])+' ' )
   fp.write("\n")
fp.close()   
